From: Alex Schroeder Date: Fri, 20 Jan 2006 00:42:54 +0000 (+0000) Subject: (rmail-summary-by-topic): Don't use rmail-current-subject-regexp. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~8790^2~118 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=01cee3987a2c55765b23ab3980d1bf14faf1bb45;p=emacs.git (rmail-summary-by-topic): Don't use rmail-current-subject-regexp. (rmail-message-subject-p): Use rmail-header-get-header instead of mail-fetch-field. (rmail-summary-by-senders): Default to current sender. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index fa85e2067ea..343d70b0553 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -143,8 +143,6 @@ SUBJECT is a string of regexps separated by commas." (interactive (let* ((subject (with-current-buffer rmail-buffer (rmail-current-subject))) - (subject-re (with-current-buffer rmail-buffer - (rmail-current-subject-regexp))) (prompt (concat "Topics to summarize by (regexp" (if subject ", default current subject" "") "): "))) @@ -167,18 +165,26 @@ non-nil otherwise." (rmail-desc-get-end msg)) (goto-char (point-min)) (if whole-message - (re-search-forward subject nil t) - (string-match subject - (let ((subj (mail-fetch-field "subject"))) - (if subj - (funcall rmail-summary-line-decoder subj) - "")))))) + (re-search-forward subject nil t)) + (string-match subject + (let ((subj (rmail-header-get-header "subject"))) + (if subj + (funcall rmail-summary-line-decoder subj) + ""))))) ;;;###autoload (defun rmail-summary-by-senders (senders) "Display a summary of all messages with the given SENDERS. SENDERS is a string of names separated by commas." - (interactive "sSenders to summarize by: ") + (interactive + (let* ((sender (when rmail-current-message + (rmail-desc-get-sender rmail-current-message))) + (sender-re (with-current-buffer rmail-buffer + (regexp-quote sender))) + (prompt (concat "Senders to summarize by (regexp" + (if sender ", default current sender" "") + "): "))) + (list (read-string prompt nil nil sender)))) (rmail-new-summary (concat "senders " senders) (list 'rmail-summary-by-senders senders)